package com.iflytek.sbd.demo.clone;

import lombok.Data;

/**
 * @program: sbd
 * @description: 浅拷贝
 * @author: 陈英俊
 * @create: 2022-01-10 17:30
 */
@Data
public class ShallowClone implements Cloneable {


    private Integer age;

    private CloneExample cloneExample;


    @Override
    protected Object clone() throws CloneNotSupportedException {
        // 调用object.clone 默认实现的是浅拷贝
        return super.clone();
    }
}
